package com.sgcc.pda.mdrh.task.safe.entity;

import com.sgcc.pda.sdk.entity.BaseEntity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 描述：风险点服务器返回结果
 * 作者：jianiuqi 2020-09-17 15:34
 */
public class RiskVerify extends BaseEntity implements Serializable {

    private List<VerifyDetail> DTS = new ArrayList<>();

    public static class VerifyDetail implements Serializable {

        //工单号
        private String appNo;

        //工作步骤
        private String stepId;

        //风险点数组
        List<RiskPoint> riskPoint = new ArrayList<>();

        public String getAppNo() {
            return appNo;
        }

        public void setAppNo(String appNo) {
            this.appNo = appNo;
        }

        public String getStepId() {
            return stepId;
        }

        public void setStepId(String stepId) {
            this.stepId = stepId;
        }

        public List<RiskPoint> getRiskPoint() {
            return riskPoint;
        }

        public void setRiskPoint(List<RiskPoint> riskPoint) {
            this.riskPoint = riskPoint;
        }
    }

    public static class RiskPoint {

        //关键风险点Id
        private String riskId;

        //风险点附件
        private List<RiskAttach> attach = new ArrayList<>();

        public String getRiskId() {
            return riskId;
        }

        public void setRiskId(String riskId) {
            this.riskId = riskId;
        }

        public List<RiskAttach> getAttach() {
            return attach;
        }

        public void setAttach(List<RiskAttach> attach) {
            this.attach = attach;
        }
    }

    public static class RiskAttach implements Serializable {

        //附件路径
        private String attachSrc;

        //附件名称
        private String attachName;

        //附件类型
        private String attachType;

        public String getAttachSrc() {
            return attachSrc;
        }

        public void setAttachSrc(String attachSrc) {
            this.attachSrc = attachSrc;
        }

        public String getAttachName() {
            return attachName;
        }

        public void setAttachName(String attachName) {
            this.attachName = attachName;
        }

        public String getAttachType() {
            return attachType;
        }

        public void setAttachType(String attachType) {
            this.attachType = attachType;
        }
    }

    public List<VerifyDetail> getDTS() {
        return DTS;
    }

    public void setDTS(List<VerifyDetail> DTS) {
        this.DTS = DTS;
    }

    public boolean isSuccess() {
        if ("1".equals(RT_F)) {
            return true;
        }
        return false;
    }
}
